
function search() {
document.indexForm.submit();
}


function isEmail(str){
	   var pattern = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/;
　　flag = pattern.test(str);  
       if(!flag) {
			alert("邮箱地址不合法!");
	   }
}


//================================================
function submitForm(){		 
		
		  var email = document.getElementById("email").value;
		  var reg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/;
		   if(!reg.test(email)) {
				alert("邮箱地址不合法!");
				return false;
		   }
		   
	  	document.addForm.submit(); 
		}
function ignoreSpaces(string) {
		var temp = "";
		string = '' + string;
		splitstring = string.split(" ");
		for(i = 0; i < splitstring.length; i++)
		temp += splitstring[i];
		return temp;
}